
package br.infotec.musicaunb.domain;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.search.annotations.DocumentId;
import org.springframework.data.jpa.domain.AbstractPersistable;

@Entity
@Table(name = "curso")
public class Curso extends AbstractPersistable<Long> implements AbstraticPojo {

	/**
	 * @author Denis
	 */
	private static final long serialVersionUID = 1L;
	
	private String nome;
	private List<Turma> turmas;
	
	@Override
	@Column(name = "id_curso")
	@GeneratedValue
	@DocumentId
	public Long getId() {
		return super.getId();
	}
	
	@Column(name = "nome")
	public String getNome() {
		return nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	@OneToMany(mappedBy = "curso")
	public List<Turma> getTurmas() {
		return turmas;
	}

	public void setTurmas(List<Turma> turmas) {
		this.turmas = turmas;
	}
	
	
	
	

}
